<?php namespace Phpcmf\Controllers;

/**
 * 二次开发时可以修改本文件，不影响升级覆盖
 */

class Remen extends \Phpcmf\Home\Module
{

    public function index() {
        $order = 'quantie_total desc,id desc';
        $list_data_1 = \Phpcmf\Service::M()->table('1_quan')->order_by($order)->where('fstatus', 1)->limit(10)->getAll();
        $list_data = [];
        foreach ($list_data_1 as $key => $val) {
            $list_data[] = [
				'id' => $val['id'],
				'cid' => $val['catid'],
				'uid' => $val['uid'],
				'title' => $val['title'],
				'jiage' => $val['jiage'],
				'thumb' => dr_get_file($val['thumb']),
				'kaifangfabu' => $val['kaifangfabu'],
				'description' => $val['description'],
				'quantie_total' => $val['quantie_total'],
				'jiaru_total' => $val['jiaru_total'],
			
			];
        }
        $data = [
			'list' => $list_data,
		];

		$this->_json('1', '读取成功', $data);
       
    }

   
}
